using Simple.Contracts.Models;
using Simple.Contracts.Models.Common;
using Simple.Contracts.Models.Common.Page;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Simple.Contracts.Contracts
{
    /// <summary>
    /// 角色服务接口
    /// </summary>
    public interface IRoleService
    {
        /// <summary>
        /// 获取角色列表
        /// </summary>
        /// <param name="input">角色列表输入参数</param>
        /// <returns>角色列表</returns>
        Task<Result<List<RoleDto>>> List(RoleListInput input);

        /// <summary>
        /// 保存角色信息
        /// </summary>
        /// <param name="input">角色保存输入参数</param>
        /// <returns>保存结果</returns>
        Task<Result<long>> Save(RoleSaveInput input);

        /// <summary>
        /// 删除角色
        /// </summary>
        /// <param name="input">角色删除输入参数</param>
        /// <returns>删除结果</returns>
        Task<Result<bool>> Delete(RoleDeleteInput input);

        /// <summary>
        /// 获取所有权限树
        /// </summary>
        /// <returns>权限树</returns>
        Task<Result<List<PermissionDto>>> GetPermissionTree();

        /// <summary>
        /// 获取角色已分配的权限
        /// </summary>
        /// <param name="roleId">角色Id</param>
        /// <returns>权限Id列表</returns>
        Task<Result<List<long>>> GetRolePermissions(int roleId);
    }
}